package com.foxit.adapp;
import java.util.ArrayList;
//import java.io.*;

public class ServerSetting {
      private ArrayList<ShowMode> info;

      public ServerSetting() {
      }
      public ServerSetting(ArrayList<ShowMode> info) {
            this.info = info;
      }
      public ServerSetting(String ss) {
            if(ss != null && ss.length()!=0) {
               String[] modeset=ss.split(";");
               this.info = new ArrayList<ShowMode>(); 
               for(int i=0;i < modeset.length;i++) {
                   String[] gset= modeset[i].split(":");
                   ArrayList<AGroup> g= new ArrayList<AGroup>();
                   for(int j=3;j < gset.length;j++) {
                       String[] gd= gset[j].split("!");
                       g.add(new AGroup(Integer.valueOf(gd[0]),gd[1]));
                   }
                   this.info.add(new ShowMode(gset[0],Integer.parseInt(gset[1]),Integer.parseInt(gset[2]),g));
               }
            }
      }
      public ArrayList<ShowMode> getSetting() {
            return info;
      }
}
